﻿using System.IO;

namespace EasyNet.TCP
{
    public class FileMsg
    {
        internal FileMsg(string directory_, string file_name, long file_size)
        {
            Directory = directory_;
            FileName = file_name;
            FileSize = file_size;
        }
        internal FileMsg(string file_path, long file_size)
        {
            Directory = Path.GetDirectoryName(file_path);
            FileName = Path.GetFileName(file_path);
            FileSize = file_size;
        }
        public string Directory { get; }
        public string FileName { get; }
        public long FileSize { get; }
        public string FilePath
        {
            get
            {
                return Path.Combine(Directory, FileName);
            }
        }
        public long TransmittedSize { get; internal set; }
        public bool IsTransmitting { get; internal set; }
    }
}
